// ************************************************************************ //
// WARNING                                                                    
// -------                                                                    
// The types declared in this file were generated from data read from a       
// Type Library. If this type library is explicitly or indirectly (via        
// another type library referring to this type library) re-imported, or the   
// 'Refresh' command of the Type Library Editor activated while editing the   
// Type Library, the contents of this file will be regenerated and all        
// manual modifications will be lost.                                         
// ************************************************************************ //

// $Rev: 18756 $
// File generated on 2013-3-21 23:23:57 from Type Library described below.

// ************************************************************************  //
// Type Lib: C:\WINDOWS\system32\msscript.ocx (1)
// LIBID: {0E59F1D2-1FBE-11D0-8FF2-00A0D10038BC}
// LCID: 0
// Helpfile: C:\WINDOWS\system32\MSSCRIPT.HLP
// HelpString: Microsoft Script Control 1.0
// DepndLst: 
//   (1) v2.0 stdole, (C:\WINDOWS\system32\stdole2.tlb)
// ************************************************************************ //
#ifndef   MSScriptControl_OCXH
#define   MSScriptControl_OCXH

#pragma option push -b -a4 -w-inl

#include <olectrls.hpp>
#include <oleserver.hpp>
#if !defined(__UTILCLS_H)
#include <utilcls.h>
#endif
#if !defined(__UTILCLS_H_VERSION) || (__UTILCLS_H_VERSION < 0x0700)
//
// The code generated by the TLIBIMP utility or the Import|TypeLibrary 
// and Import|ActiveX feature of C++Builder rely on specific versions of
// the header file UTILCLS.H found in the INCLUDE\VCL directory. If an 
// older version of the file is detected, you probably need an update/patch.
//
#error "This file requires a newer version of the header UTILCLS.H" \
       "You need to apply an update/patch to your copy of C++Builder"
#endif
#include <olectl.h>
#include <ocidl.h>
#if !defined(_NO_VCL)
#include <stdvcl.hpp>
#endif  //   _NO_VCL
#include <ocxproxy.h>

#include "MSScriptControl_TLB.h"
namespace Msscriptcontrol_tlb
{

// *********************************************************************//
// HelpString: Microsoft Script Control 1.0
// Version:    1.0
// *********************************************************************//


// *********************************************************************//
// COM Component Proxy Class Declaration
// Component Name   : TProcedure
// Help String      : Describes a procedure
// Default Interface: IScriptProcedure
// Def. Intf. Object: IScriptProcedurePtr
// Def. Intf. DISP? : No
// Event   Interface: 
// TypeFlags        : (0)
// *********************************************************************//
class PACKAGE TProcedure : public Oleserver::TOleServer
{
  IScriptProcedurePtr m_DefaultIntf;
  _di_IUnknown __fastcall GetDunk();
public:
  __fastcall TProcedure(TComponent* owner) : Oleserver::TOleServer(owner)
  {}

  IScriptProcedurePtr& GetDefaultInterface();
  void __fastcall InitServerData();
  void __fastcall Connect();
  void __fastcall Disconnect();
  void __fastcall BeforeDestruction();
  void __fastcall ConnectTo(IScriptProcedurePtr intf);


  BSTR            __fastcall get_Name(void);
  long            __fastcall get_NumArgs(void);
  VARIANT_BOOL    __fastcall get_HasReturnValue(void);
  __property BSTR Name={ read=get_Name };
  __property long NumArgs={ read=get_NumArgs };
  __property VARIANT_BOOL HasReturnValue={ read=get_HasReturnValue };
};


// *********************************************************************//
// COM Component Proxy Class Declaration
// Component Name   : TProcedures
// Help String      : Collection of procedures
// Default Interface: IScriptProcedureCollection
// Def. Intf. Object: IScriptProcedureCollectionPtr
// Def. Intf. DISP? : No
// Event   Interface: 
// TypeFlags        : (0)
// *********************************************************************//
class PACKAGE TProcedures : public Oleserver::TOleServer
{
  IScriptProcedureCollectionPtr m_DefaultIntf;
  _di_IUnknown __fastcall GetDunk();
public:
  __fastcall TProcedures(TComponent* owner) : Oleserver::TOleServer(owner)
  {}

  IScriptProcedureCollectionPtr& GetDefaultInterface();
  void __fastcall InitServerData();
  void __fastcall Connect();
  void __fastcall Disconnect();
  void __fastcall BeforeDestruction();
  void __fastcall ConnectTo(IScriptProcedureCollectionPtr intf);


  LPUNKNOWN       __fastcall get__NewEnum(void);
  Msscriptcontrol_tlb::IScriptProcedure* __fastcall get_Item(VARIANT Index/*[in]*/);
  long            __fastcall get_Count(void);
  __property LPUNKNOWN _NewEnum={ read=get__NewEnum };
  __property Msscriptcontrol_tlb::IScriptProcedure* Item[VARIANT Index]={ read=get_Item };
  __property long Count={ read=get_Count };
};


// *********************************************************************//
// COM Component Proxy Class Declaration
// Component Name   : TModule
// Help String      : Context in which functions can be defined and expressions can be evaluated
// Default Interface: IScriptModule
// Def. Intf. Object: IScriptModulePtr
// Def. Intf. DISP? : No
// Event   Interface: 
// TypeFlags        : (0)
// *********************************************************************//
class PACKAGE TModule : public Oleserver::TOleServer
{
  IScriptModulePtr m_DefaultIntf;
  _di_IUnknown __fastcall GetDunk();
public:
  __fastcall TModule(TComponent* owner) : Oleserver::TOleServer(owner)
  {}

  IScriptModulePtr& GetDefaultInterface();
  void __fastcall InitServerData();
  void __fastcall Connect();
  void __fastcall Disconnect();
  void __fastcall BeforeDestruction();
  void __fastcall ConnectTo(IScriptModulePtr intf);


  BSTR            __fastcall get_Name(void);
  LPDISPATCH      __fastcall get_CodeObject(void);
  Msscriptcontrol_tlb::IScriptProcedureCollectionPtr __fastcall get_Procedures(void);
  void            __fastcall AddCode(BSTR Code/*[in]*/);
  VARIANT         __fastcall Eval(BSTR Expression/*[in]*/);
  void            __fastcall ExecuteStatement(BSTR Statement/*[in]*/);
  VARIANT         __fastcall Run(BSTR ProcedureName/*[in]*/, LPSAFEARRAY* Parameters/*[in]*/);
  __property BSTR Name={ read=get_Name };
  __property LPDISPATCH CodeObject={ read=get_CodeObject };
  __property Msscriptcontrol_tlb::IScriptProcedureCollectionPtr Procedures={ read=get_Procedures };
};


// *********************************************************************//
// COM Component Proxy Class Declaration
// Component Name   : TModules
// Help String      : Collection of modules
// Default Interface: IScriptModuleCollection
// Def. Intf. Object: IScriptModuleCollectionPtr
// Def. Intf. DISP? : No
// Event   Interface: 
// TypeFlags        : (0)
// *********************************************************************//
class PACKAGE TModules : public Oleserver::TOleServer
{
  IScriptModuleCollectionPtr m_DefaultIntf;
  _di_IUnknown __fastcall GetDunk();
public:
  __fastcall TModules(TComponent* owner) : Oleserver::TOleServer(owner)
  {}

  IScriptModuleCollectionPtr& GetDefaultInterface();
  void __fastcall InitServerData();
  void __fastcall Connect();
  void __fastcall Disconnect();
  void __fastcall BeforeDestruction();
  void __fastcall ConnectTo(IScriptModuleCollectionPtr intf);


  LPUNKNOWN       __fastcall get__NewEnum(void);
  Msscriptcontrol_tlb::IScriptModule* __fastcall get_Item(VARIANT Index/*[in]*/);
  long            __fastcall get_Count(void);
  Msscriptcontrol_tlb::IScriptModule* __fastcall Add(BSTR Name/*[in]*/, 
                                                     VARIANT* Object/*[in,opt]*/= TNoParam());
  __property LPUNKNOWN _NewEnum={ read=get__NewEnum };
  __property Msscriptcontrol_tlb::IScriptModule* Item[VARIANT Index]={ read=get_Item };
  __property long Count={ read=get_Count };
};


// *********************************************************************//
// COM Component Proxy Class Declaration
// Component Name   : TError
// Help String      : Provides access to scripting error information
// Default Interface: IScriptError
// Def. Intf. Object: IScriptErrorPtr
// Def. Intf. DISP? : No
// Event   Interface: 
// TypeFlags        : (0)
// *********************************************************************//
class PACKAGE TError : public Oleserver::TOleServer
{
  IScriptErrorPtr m_DefaultIntf;
  _di_IUnknown __fastcall GetDunk();
public:
  __fastcall TError(TComponent* owner) : Oleserver::TOleServer(owner)
  {}

  IScriptErrorPtr& GetDefaultInterface();
  void __fastcall InitServerData();
  void __fastcall Connect();
  void __fastcall Disconnect();
  void __fastcall BeforeDestruction();
  void __fastcall ConnectTo(IScriptErrorPtr intf);


  long            __fastcall get_Number(void);
  BSTR            __fastcall get_Source(void);
  BSTR            __fastcall get_Description(void);
  BSTR            __fastcall get_HelpFile(void);
  long            __fastcall get_HelpContext(void);
  BSTR            __fastcall get_Text(void);
  long            __fastcall get_Line(void);
  long            __fastcall get_Column(void);
  void            __fastcall Clear(void);
  __property long Number={ read=get_Number };
  __property BSTR Source={ read=get_Source };
  __property BSTR Description={ read=get_Description };
  __property BSTR HelpFile={ read=get_HelpFile };
  __property long HelpContext={ read=get_HelpContext };
  __property BSTR Text={ read=get_Text };
  __property long Line={ read=get_Line };
  __property long Column={ read=get_Column };
};


// *********************************************************************//
// COM Component Proxy Class Declaration
// Component Name   : TScriptControl
// Help String      : Control to host scripting engines that understand the ActiveX Scripting interface
// Default Interface: IScriptControl
// Def. Intf. Object: TCOMIScriptControl
// Def. Intf. DISP? : No
// Event   Interface: DScriptControlSource
// TypeFlags        : (34) CanCreate Control
// *********************************************************************//

// *********************************************************************//
// Definition of closures to allow VCL handlers to catch OCX events.      
// *********************************************************************//
//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
// Proxy class to host Control to host scripting engines that understand the ActiveX Scripting interface in CBuilder IDE/Applications.
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
class PACKAGE TScriptControl : public TOleControl
{
  OVERLOADED_PROP_METHODS;
  static TNoParam  OptParam;
  static GUID      DEF_CTL_INTF;

  // Instance of Closures to expose OCX Events as VCL ones
  //
  TNotifyEvent                   FOnError;
  TNotifyEvent                   FOnTimeout;

  // Default Interace of OCX
  //
  TCOMIScriptControl m_OCXIntf;

  // VCL Property Getters/Setters which delegate to OCX
  //
  Msscriptcontrol_tlb::IScriptModuleCollectionPtr __fastcall get_Modules(void);
  Msscriptcontrol_tlb::IScriptErrorPtr __fastcall get_Error(void);
  LPDISPATCH      __fastcall get_CodeObject(void);
  Msscriptcontrol_tlb::IScriptProcedureCollectionPtr __fastcall get_Procedures(void);

  // Static variables used by all instances of OCX proxy
  //
  static int          EventDispIDs[2];
  static TControlData2 CControlData;
  static GUID          CTL_DEF_INTF;

  // Method providing access to interface as __property 
  //
  TCOMIScriptControl __fastcall GetDefaultInterface();
  TCOMIScriptControl __fastcall GetControlInterface()
  { return GetDefaultInterface(); }

protected:
  void     __fastcall CreateControl  ();
  void     __fastcall InitControlData();

public:
  virtual  __fastcall TScriptControl(TComponent* AOwner) : TOleControl(AOwner)
  {};
  virtual  __fastcall TScriptControl(HWND        Parent) : TOleControl(Parent)
  {};

  // OCX methods
  //
  void            __fastcall _AboutBox(void);
  void            __fastcall AddObject(BSTR Name/*[in]*/, LPDISPATCH Object/*[in]*/, 
                                       VARIANT_BOOL AddMembers/*[in,def,opt]*/);
  void            __fastcall Reset(void);
  void            __fastcall AddCode(BSTR Code/*[in]*/);
  VARIANT         __fastcall Eval(BSTR Expression/*[in]*/);
  void            __fastcall ExecuteStatement(BSTR Statement/*[in]*/);
  VARIANT         __fastcall Run(BSTR ProcedureName/*[in]*/, LPSAFEARRAY* Parameters/*[in]*/);

  // OCX properties
  //
  __property Msscriptcontrol_tlb::IScriptModuleCollectionPtr Modules={ read=get_Modules };
  __property Msscriptcontrol_tlb::IScriptErrorPtr Error={ read=get_Error };
  __property _di_IDispatch CodeObject={ read=GetIDispatchProp, index=1000 };
  __property Msscriptcontrol_tlb::IScriptProcedureCollectionPtr Procedures={ read=get_Procedures };
  __property TCOMIScriptControl ControlInterface={ read=GetDefaultInterface };

  // Published properties
  //
__published:

  // Standard/Extended properties
  //

  // OCX properties
  //
  __property System::WideString Language={ read=GetWideStringProp, write=SetWideStringProp, stored=false, index=1500 };
  __property Activex::TOleEnum State={ read=GetTOleEnumProp, write=SetTOleEnumProp, stored=false, index=1501 };
  __property int SitehWnd={ read=GetIntegerProp, write=SetIntegerProp, stored=false, index=1502 };
  __property int Timeout={ read=GetIntegerProp, write=SetIntegerProp, stored=false, index=1503 };
  __property bool AllowUI={ read=GetWordBoolProp, write=SetWordBoolProp, stored=false, index=1504 };
  __property bool UseSafeSubset={ read=GetWordBoolProp, write=SetWordBoolProp, stored=false, index=1505 };

  // OCX Events
  //
  __property TNotifyEvent OnError={ read=FOnError, write=FOnError };
  __property TNotifyEvent OnTimeout={ read=FOnTimeout, write=FOnTimeout };
};
typedef TScriptControl  TScriptControlProxy;

};     // namespace Msscriptcontrol_tlb

#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using  namespace Msscriptcontrol_tlb;
#endif

#pragma option pop

#endif // MSScriptControl_OCXH
